//
//  ContentView.swift
//  SwiftUIAnimation
//
//  Created by 李煜 on 2024/8/19.
//

import SwiftUI

struct ContentView: View {
  
  @State private var message = "Loading..."

  var body: some View {
    Text(message)
      .onAppear {
        print("View appeared")
        // 这里的代码会在视图第一次渲染之前执行
        message = "Hello, World!"
      }
    VStack {
      //
      Text("隐式动画animation和显示动画withAnimation")
    }
    
  }
}


#Preview {
  ContentView()
}
